package com.ddzh.clients;

import com.ddzh.clients.fallback.UserFeignApiFallBack;
import com.ddzh.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "USER-SERVICE",fallback = UserFeignApiFallBack.class)// 注册到注册中心的提供方服务的名称
public interface UserFeignApi {
    @GetMapping("/user/{id}")
    public User queryById(@PathVariable("id") String username);
}
